<?php

namespace App\Services\Tcc\Transaction;


use App\Models\User;
use Illuminate\Support\Facades\DB;

class Participant
{
    public $uri ; // 参与者链接
    public $expires ; // 过期时间

    public function TccTry()
    {
        DB::beginTransaction();
        try {
            $result = User::insert([
                'name'=>'Roan',
                'password'=>'Roancsu*!%..'
            ]);
            DB::commit();
        } catch (\Exception $e) {
            DB::rollBack();
            $result = 0;
        }
        return $result;
    }

    /**
     * @return mixed
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * @param mixed $uri
     */
    public function setUri($uri)
    {
        $this->uri = $uri;
    }

    /**
     * @return mixed
     */
    public function getExpires()
    {
        return $this->expires;
    }

    /**
     * @param mixed $expires
     */
    public function setExpires($expires)
    {
        $this->expires = $expires;
    }

}